#pragma once
#include "ProjectPlan/PPTimeSpan.h"

namespace LBPROJ
{
    class CTimeSpan : public ITimeSpan
    {
        IMPLEMENT_REFCOUNTING(CTimeSpan)
    public:
        CTimeSpan();
        virtual ~CTimeSpan();

    public:
        virtual Type GetType() const;
        virtual void SetType(Type type);

        virtual double GetSpan() const;
        virtual void SetSpan(double span);

        virtual void Set(Type type, double span);

        virtual std::wstring GetSpanAsString() const;
        virtual std::wstring GetDaysAsString(bool bUnit = true) const;
        virtual int GetDays() const;

        virtual CRefPtr<ITimeSpan> AddDays(int days) const;

    protected:
        double m_span;
        Type m_type{ Type::E_Day };

    private:
    };
}